<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Achievement Information System">
		<meta name="author" content="Noval Debby Prasetyono - Renny Sari Dewi">
		<title>AchIS</title>
		
		<link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/jqwidgets/jqx.base.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/jqwidgets/jqx.fresh.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/css/magnific-popup.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/css/jquery.fs.dropper.min.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/css/style.css" rel="stylesheet" type="text/css" />
		
		<script src="<?php echo base_url(); ?>assets/js/jquery-1.11.0.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/jquery.ui.widget.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/jquery.fileupload.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/jquery.fs.dropper.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/bootstrap.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/jqwidgets/jqx-all.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/magnific-popup.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/main.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/messages.js" type="text/javascript"></script>
	</head>
	<body style="background-color:#7595FF;">
		<div class="container">
			<div class="panel panel-default">
				<div class="panel-heading" style="background:url('<?php echo base_url(); ?>assets/images/banner.jpg'); background-size : 100% 100%; height:250px;">
					&nbsp;
				</div>
				<div class="panel-body">
					<?php if(isset($_SESSION[SESSION_USERID])){ ?>
						<?php echo $menu; ?>
						<div class="col-md-9" id="maincontent" style="padding-top:15px;"></div>
					<?php }else{ ?>
						<div class="col-md-12" id="maincontent" style="padding-top:15px;"></div>
					<?php } ?>
				</div>
				<div class="panel-footer" align="center">
					<?php if(!isset($_SESSION[SESSION_USERID])){ ?>
					<div class="row" class='active'>
						<div class="col-md-6" align="left">
							Dinas Pendidikan Kota Surabaya<br/>
							Jl. Jagir Wonokromo No 354-356 Surabaya<br/>
							Telp : 031 - 8411613 / Fax : 031 - 8418904<br/>
						</div>
						<div class="col-md-6">
							<form role="form" action="c_login/verification" method="post" class="form-inline">
								<div class="form-group">
									<label for="login_username" class="control-label">Login</label>
									<input type="text" class="form-control" id="login_username" name="login_username" placeholder="Username">
								</div>
								<div class="form-group">
									<label for="login_password" class="control-label">&nbsp;</label>
									<input type="password" class="form-control" id="login_username" name="login_password"  placeholder="Password">
								</div>
								<div class="form-group">
									<button type="submit" class="btn btn-default" style="margin:auto 10px auto 10px;">Login</button>
								</div>
							</form>
						</div>
					</div>
					<?php } ?>
					&copy; 2014, AchIS | Achievement Information System
				</div>
			</div>
		</div>
		<div id="global_notif_info"><span id="notif_message"></span></div>
		<div id="global_confirm_window">
			<div><span id="confirm_window_title"></div>
			<div>
				<div id="confirm_window_message"></div>
				<div>
					<div style="float: right; margin-top: 15px;">
						<input type="button" id="confirm_window_ok" value="OK" style="margin-right: 10px" />
						<input type="button" id="confirm_window_cancel" value="Batal" />
					</div>
				</div>
			</div>
		</div>
		<script>
			/* Declare global variables here */
			var global_theme = 'fresh';
			
			$(document).ready(function(){
				$("#mainmenu li").click(function(){
					var elm = $(this);
					var link = elm.attr("pages");
					if(link == "login" || link == "login/logout"){
						window.location="c_"+link;
					}else{
						$("#maincontent").empty();
						$("#maincontent").load('c_'+link);
					}
				});
				$("#maincontent").load('c_main/welcome');
				$.global_show_notif = function(msg, temp){
					$("#notif_message").text(msg);
					$("#global_notif_info").jqxNotification({
						position: "top-right", opacity: 0.9,
						animationOpenDelay: 800, template: temp
					});
					$("#global_notif_info").jqxNotification('open');
				}
				
				$('#global_confirm_window').jqxWindow({
					maxHeight: 150, maxWidth: 280, minHeight: 30, minWidth: 250, height: 145, width: 270,
					resizable: false, isModal: true, modalOpacity: 0.3, autoOpen : false,
					okButton: $('#confirm_window_ok'), cancelButton: $('#confirm_window_cancel'),
					initContent: function () {
						$('#confirm_window_ok').jqxButton({ width: '65px' });
						$('#confirm_window_cancel').jqxButton({ width: '65px' });
						$('#confirm_window_ok').focus();
					}
				});
				$.global_show_confirm = function(title, msg){
					var confirm = $('#global_confirm_window');
					$("#confirm_window_title").text(title);
					$("#confirm_window_message").text(msg);
					$('#confirm_window_ok').show();
					$('#confirm_window_cancel').show();
					confirm.jqxWindow('open');
				}
				$.global_show_processing = function(){
					var ob=new Object();
					var process = $('#global_confirm_window');
					$('#confirm_window_ok').hide();
					$('#confirm_window_cancel').hide();
					$("#confirm_window_title").text('Mohon Tunggu...');
					$("#confirm_window_message").html("<img src='assets/images/ajax-loader.gif' style='width:100%;margin-top:20px;'>");
					process.jqxWindow('open');
					ob.hide = function(){
						process.jqxWindow('hide');
					};
					return ob;
				}
			});
		</script>
	</body>
</html>